#include "Level.h"

Level::Level()
{
}

std::vector<ProjectilePtr>& Level::getProjectiles()
{
    return projectiles;
}

void Level::addProjectile(ProjectilePtr projectile)
{
    projectiles.push_back(projectile);
}

std::vector<PickupPtr>& Level::getPickups()
{
    return pickups;
}

void Level::addPickup(PickupPtr pickup)
{
    pickups.push_back(pickup);
}

std::vector<EnemyPtr>& Level::getEnemies()
{
    return enemies;
}

void Level::addEnemy(EnemyPtr enemy)
{
    enemies.push_back(enemy);
}

void Level::update(float delta)
{
    for(projectile_it it = projectiles.begin(); it != projectiles.end(); ++it)
    {
        (*it)->update(delta);
    }
}

void Level::render(sf::RenderWindow& window)
{
    for(projectile_it it = projectiles.begin(); it != projectiles.end(); ++it)
    {
        //(*it)->getSprite()->SetPosition((*it)->getPosition());
        window.Draw(*(*it)->getSprite());
    }
}